package four.book.biz.impl;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import four.book.biz.UserBiz;
import four.book.dao.UserMapper;
import four.book.entity.User;

/**
@author 閺夊骸绻�
@version 1.0
<p>閺冦儲婀￠敍锟�18楠烇拷2閺堬拷7閺冿拷娑撳宕�:10:05</p>
 */
@Service
public class UserBizImpl implements UserBiz {
	@Resource
	private  UserMapper userMapper;
	public User getuser(User user) {
		User user1=userMapper.selectByPrimaryKey(user);
		return user1;
	}

	public int adduser(User user) {
		int i=userMapper.insert(user);
		return i;
	}

	public int updateuser(User user) {
		// TODO Auto-generated method stub
		return 0;
	}

	public int deleteuser(User user) {
		// TODO Auto-generated method stub
		return 	userMapper.deleteByPrimaryKey(user.getUserId());

	}

	public List<User> selectusers() {
		// TODO Auto-generated method stub
		return userMapper.selectusers();
	}

}
